home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / olrdrs / jh3b4of4.zip / SETPATH.TXT < prev    next >
Text File  |  1993-03-01  |  5KB  |  114 lines

  1.             SETPATH - create DOS PATH from file
  2.  
  3.  
  4.             Syntax
  5.  
  6.             SETPATH [D:\PATH\]FILENAME.EXT
  7.  
  8.             Parameters
  9.  
  10.             FILENAME.EXT is the name of the path file;  a standard ASCII
  11.             file which contains the names of ALL the directories in the
  12.             DOS PATH.  The format of the file is simple: one path entry
  13.             per line, exactly as they would appear in the SET PATH=
  14.             command:
  15.  
  16.             C:\
  17.             C:\MSDOS
  18.             D:\UTILS
  19.             .
  20.             etc....
  21.  
  22.             Comments
  23.  
  24.             SETPATH will create the DOS PATH from the entries in
  25.             FILENAME.EXT.  As with ADDPATH/REMPATH, SETPATH will
  26.             validate each entry, but with a twist: if an invalid entry
  27.             is found in the path file, SETPATH will beep three times,
  28.             display an appropriate error message with the invalid entry
  29.             and its location in the file, and will wait five seconds
  30.             before continuing.  If you use SETPATH as a replacement for
  31.             the DOS PATH command in AUTOEXEC.BAT, this feature is very
  32.             useful, since PATH will still be built, but you will be
  33.             notified of the error.  If you missed the error display, re-
  34.             run SETPATH from the command line.  SETPATH can be used as
  35.             often as desired;  it will create a complete new DOS PATH
  36.             each time it is run.
  37.  
  38.             Note that the current "." and parent ".." directory entries
  39.             are allowed in the SETPATH file.  Although DOS automatically
  40.             searches the current directory before searching the path,
  41.             this feature allows you to list matching files in the
  42.             current and/or parent directory when using the SRCHPATH
  43.             program.
  44.  
  45.             IMPORTANT NOTE: DOS ENVIRONMENT SPACE
  46.  
  47.             The PATH variable is stored in the DOS environment, which 
  48.             normally defaults to 160 bytes.  If your PATH contains 
  49.             many directories, or if you already use a large number of 
  50.             environment variables (e.g., you have many SET commands in
  51.             AUTOEXEC.BAT), DOS may issue an "out of environment space"  
  52.             message.  In such cases, you should increase environment
  53.             allocation via the SHELL command in CONFIG.SYS:
  54.  
  55.             SHELL=C:\COMMAND.COM /P /E:XXXX
  56.  
  57.             where XXXX is the desired environment space, in bytes.  If
  58.             you had sufficient environment space before you used SETPATH, 
  59.             and you did not use the SHELL command in CONFIG.SYS, then the 
  60.             value XXXX should be equal to:
  61.  
  62.             165 + total size of the entries contained in the FILENAME.EXT 
  63.             file + total number of entries in FILENAME.EXT file.
  64.  
  65.             If you used the SHELL command in CONFIG.SYS, then you should 
  66.             replace 165 with your current environment size in the formula
  67.             above.
  68.  
  69.             EXAMPLE
  70.  
  71.             You do not use a SHELL command, and you ran out of environment
  72.             space when running SETPATH. Path entries in PATH.DAT are as 
  73.             follows:
  74.             
  75.             C:\                 (3 characters)
  76.             C:\DOS              (6 characters)
  77.             C:\UTIL             (7 characters)
  78.             D:\GENERAL\BAT      (14 characters)
  79.             F:\WINDOWS          (10 characters)
  80.  
  81.             The total length of the entries is 3+6+7+14+10=40 characters.
  82.             The formula above yields:
  83.  
  84.             165 + 40 (length of entries) + 5 (number of entries) = 210
  85.  
  86.             You should add the following statement to CONFIG.SYS:
  87.  
  88.             SHELL=C:\COMMAND.COM /P /E:210
  89.  
  90.             Note: The above method guarantees sufficient environment space
  91.             to store the PATH value.  However:
  92.  
  93.             - If you increase the number of entries in your path file or if
  94.               you add SET commands in AUTOEXEC.BAT, you may have to increase
  95.               environment space again.
  96.  
  97.             - If you did not have a SHELL command in CONFIG.SYS, you may  
  98.               not have exceeded the 160 bytes default by much, and the 
  99.               above method will allocate more environment than is actually
  100.               needed (160 bytes at worst).
  101.  
  102.             - If you want freedom from worry, purposely over-allocate 
  103.               environment space by assigning a larger value to the /E:
  104.               value -- but don't do it if you need every available byte 
  105.               of DOS memory.
  106.  
  107.             - A utility such as QuarterDesk's Manifest (included in the 
  108.               last few releases of the QEMM memory manager) will let you 
  109.               know if you are over-allocating your environment, and by
  110.               how much.
  111.  
  112.             - The DOS 6.0 MEM /D command will also show the amount of 
  113.               allocated environment.
  114.